probOne = 0.33;
probZero = 0.47;
n = 100;
w = 32;
z = 48;
probOneAtI = 0;
probLessThanWAndZ = 0;

for i = 1:w
    probOneAtI = nchk(n,i)*((1-probOne)^(n-i))*probOne^i;
    probZeroAtJ = 0;
    
    
    for j = 1:z
        
        probZeroAtJ = probZeroAtJ + nchk(n,j)*((1-probZero)^(n-j))*probZero^j;
        
    end
    
    probLessThanWAndZ = probLessThanWAndZ + probZeroAtJ*probOneAtI;
    
end

fprintf('The probability that W is less than %d',w);
fprintf(' and Z is less than %d',z);
fprintf(' is: %f\n',probLessThanWAndZ);